Using Icon Families
To provide your application with icon families for itself and for its
documents, follow these steps:
1. Create an icon list ('ICN#') resource for your application file.
2. Create the other members of the icon family of the application
file- resources of types 'ics#', 'icl8', 'icl4', 'ics8', and 'ics4'-and give
each of these the same resource ID as the 'ICN#' resource.
3. Create a bundle ('BNDL') resource.
4. Within the bundle resource, list the resource ID of the application
file's 'ICN#' resource and assign it a local ID of 0.
5. Create an 'FREF' resource for the application file.
6. Within the 'FREF' resource, assign the application a file type of
'APPL' and assign it a local ID of 0.
7. Within the bundle resource, list the resource ID of the 'FREF'
resource for the application file and assign it a unique local ID-for
example, 0 to maintain consistency with the local ID assigned in the
'FREF' resource.
8. Create another icon family-consisting of resources of types 'ICN#,'
'ics#', 'icl8', 'icl4', 'ics8', and 'ics4'-to represent one type of
document that your application creates.
9. Within the application's bundle resource, list the resource ID of the
document's 'ICN#' resource and assign it a local ID of 1.
10. Create an 'FREF' resource for the document.
11. Within the 'FREF' resource for the document, assign it a file type (for
example, 'TEXT' or 'edtt') and assign it a local ID of 1.
12. Within the bundle resource, list the resource ID of the 'FREF'
resource for the document and assign it a unique local ID-for example,
1 to maintain consistency with the local ID assigned in the 'FREF'
resource.
13. Assigning unique local IDs for every type of document your application
creates, repeat steps 8 through 12.
14. If your application supports file types of other applications, define
'FREF' resources for them, but do not create icon resources for them.
15. Create a signature resource (as described in the separate section en titled, Creators, File types, and the Signature Resource)
with resource ID 0; in it, set the creator to your signature. 16. Set the file's hasBundle bit, and clear its hasBeenInited bit in the
file's Finder flags. (Finder flags are described in the section, 17. Save and close all of the resources. (When your restart your
Macintosh, the application should appear with its own icon. If you later
alter any of your icons, clear the hasBeenInited bit and rebuild your
desktop database by pressing the Command-Option keys when
re starting.)